home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swaga_c.zip / ANSI.SWG / 0023_ANSI String Thing.pas < prev    next >
Pascal/Delphi Source File  |  1993-11-02  |  1KB  |  47 lines

  1. {Here's a neat ANSI effect that scrolls a string in... quite neat i think.}
  2.  
  3.   procedure Thingy;
  4.     const
  5.       len = 45;
  6.       IL : string[len] = 'Cool String Thingy! by The MAN';
  7.       chardelay = 10;
  8.       enddelay = 1000;
  9.     var
  10.       loop: byte;
  11.     begin
  12.       TextColor(white);
  13.       GotoXY(1,1);
  14.       write(IL);
  15.       Delay(chardelay);
  16.       TextColor(Random(15)+1);
  17.       GotoXY(1,1);
  18.       write(IL[1]);
  19.       Delay(chardelay);
  20.       GotoXY(2,1);
  21.       TextColor(Random(15)+1);
  22.       write(IL[2]);
  23.       Delay(chardelay);
  24.       for loop:=3 to len do
  25.         begin
  26.           GotoXY(loop-2,1);
  27.       TextColor(Random(15)+1);
  28.       {TextColor(white);}
  29.       write(IL[loop-2]);
  30.       Delay(chardelay);
  31.       GotoXY(loop-1,1);
  32.       TextColor(Random(15)+1);
  33.       write(IL[loop-1]);
  34.       Delay(chardelay);
  35.       GotoXY(loop,1);
  36.       TextColor(Random(15)+1);
  37.       write(IL[loop]);
  38.       Delay(chardelay);
  39.     end;
  40.       Delay(enddelay);
  41.     end;
  42.  
  43. BEGIN
  44. Thingy;
  45. END.
  46.  
  47.